#ifndef _TIMER_H
#define _TIMER_H

#include "sn_config.h"
struct timer_dev_t ;
extern uint32_t jiffies;
#define TIMER_INJECT_MAX 5

struct timer_dev_t 
{
    /**
     * @brief 此函数应在定时器中调用
     * 
     */
		void (*timer_enable)(void);
    void (*timer_callback)(struct timer_dev_t *dev ,void*param);
    void (*timer_inject_callback[TIMER_INJECT_MAX])(struct timer_dev_t *dev ,void*param);
    int (*set_inject_callback)(struct timer_dev_t *dev,void (*timer_inject_func)(struct timer_dev_t ,void*),uint8_t num);
    uint32_t(*get_jiffies)(void);
};
int timer_init(struct timer_dev_t **dev);
extern uint32_t get_global_timer(void);
#endif // !_TIMER_H
